package entity;

public class User {
    private Integer id;
    private String userName;
    private String passWord;
    private String question;
    private String answer;
    private Integer level;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassWord() {
        return passWord;
    }

    public void setPassWord(String passWord) {
        this.passWord = passWord;
    }

    public String getQuestion() {
        return question;
    }

    public void setQuestion(String question) {
        this.question = question;
    }

    public String getAnswer() {
        return answer;
    }

    public void setAnswer(String answer) {
        this.answer = answer;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public User() {
    }

    public User(Integer id) {
        this.id = id;
    }

    public User(String userName,String passWord,  String question,String answer,Integer level) {
        this.userName = userName;
        this.passWord=passWord;
        this.question = question;
        this.answer = answer;
        this.level = level;
    }

    public User(Integer id, String userName, String passWord, String question, String answer,Integer level) {
        this.id = id;
        this.userName = userName;
        this.passWord = passWord;
        this.question = question;
        this.answer = answer;
        this.level = level;
    }

    @Override
    public String toString() {
        return "{" +
                "账号：" + id +
                ", 用户名：" + userName +
                ", 密码：" + passWord +
                ", 密保问题：" + question +
                ", 密保答案：" + answer +
                ", 用户权限：" + level +
                "}\n";
    }
}
